home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / J_AUTHOR / Mojo / data.2 / README.TXT < prev    next >
Encoding:
Text File  |  1996-07-02  |  8.8 KB  |  257 lines

  1. Mojo Development Environment for Java
  2.  
  3.  
  4. RELEASE 1.2 (EVALUATION COPY)
  5.  
  6. NOTE: This version will expire in 30 days from installation.
  7.       After which, certain features will be disabled, such
  8.       as Saving.
  9.  
  10. To order Mojo, visit http://www.PenumbraSoftware.com
  11.                or call (770) 352-0100 (USA)
  12.  
  13. ==================================================================
  14.  
  15. Mojo is comprised of two elements: the Designer and the Coder.
  16.  
  17. The Mojo Designer is designed for non-programmers who wish to enter the 
  18. domain of Java programming with the smallest possible learning curve.  
  19. From the outset novice users should be able to create simple 
  20. functioning applets which can be run over the Internet or locally.  
  21. However, Mojo differs from traditional drag-and-drop environments in 
  22. that it also allows the novice user to progress and development more 
  23. sophisticated applications and take advantage of the complete Java 
  24. programming language.
  25.  
  26. Although the emphasis is on non-programmers, experienced programmers 
  27. will benefit from use of Mojo in its reuse of components and easy 
  28. extensibility.  Since the complete Java programming API is available for 
  29. programmers, experienced programmers should not feel limited by the 
  30. environment in the Coder.
  31.  
  32. NOTE: Offline MS-Word Documents are available in the DOCS directory
  33.       directly off the install path.
  34.  
  35.       Included are:
  36.  
  37.       Programmers Quickstart
  38.       Inventory Demo (Complete Tutorial)
  39.  
  40. --------------------------- Sample Applet -----------------------------
  41.  
  42. 1.  In the Designer,  drop in a Button into the interface by Clicking
  43.     on the button icon in the Component Palette at the top of the
  44.     Designer.  Then click in the Drawing Area to place it.
  45.  
  46. ADDING A SOUND:
  47.  
  48. Mojo incorporates a sophisticated means of allowing the user to incorporate
  49. functionality without touching a single line of code.  This is accomplished
  50. using Actions.  Actions can be dragged and dropped into any
  51. Component's Action list to allow a particular response to an Event.
  52. Events are things that happen to a component.  For instance, one
  53. event is the Action event which occurs when a user clicks on a Button.
  54. In the following example, we will play a sound when the user clicks on
  55. a button.
  56.          
  57. 2. From the "Window" menu, select "Available Actions".
  58. 3. Click on the Action tab at the bottom of the Selected Component 
  59.    window.
  60. 4. Select the Event Name to be "action" ( you will need to scroll down 
  61.    the list).  NOTE: Buttons only respond to the action event in Java.
  62. 5. Drag the Play Sound task from the Task List to the Gray area of the 
  63.    Selected Component window.  You will see the NO icon turn into a 
  64.    drop icon.
  65. 6. When the dialog box comes up asking for sound file name, click on
  66.    specify file.  Change directories into the "sounds" directory.  We
  67.    have provided you with a sampling of .au sounds.  Select any of
  68.    the sound files.  You must use the Specify File button to specify
  69.    sounds, as this will also copy the sound resources you select into
  70.    the Output directory of your project.
  71.  
  72.    Some sample sounds are:
  73.  
  74.                 bong.au
  75.                 gong.au
  76.                 bubble1.au
  77.                 dah.au
  78.                 space.au    <-- this one plays a lot of music (try it)
  79.                 train.au
  80.  
  81. 7.  Click on Ok to process the Task.
  82.  
  83.  
  84. ADDING AN IMAGE:
  85.  
  86. 8.  Click the Properties tab of the Selected Component window to see the
  87.     properties again.
  88. 9.  Select the "Picture" component located in the "Standard" category.
  89. 10. Drop a Picture into the Screen by clicking in the drawing area.
  90. 11. Change the Filename property to one of the following by clicking on 
  91.     the Filename field of the properties box.  You should see a button 
  92.     with three dots (...) appear.  Click on that button and browse to 
  93.     the directory "images".  You will find an assortment of images there.
  94.     Select on of the images and click Ok.
  95.  
  96.     Some images provided are:
  97.  
  98.                 penpag.gif
  99.                 gopag2.gif
  100.                 mojopag.gif
  101.                 javapag.gif
  102.                 blacbox.gif
  103.  
  104.         (for a complete listing see MOJO\images\*.gif)
  105.  
  106.  
  107. RUNNING THE APPLET:
  108.  
  109. 12. "Run Applet" under the Project menu item in the main menu bar.
  110.      (i.e. Project|Run Applet)
  111.  
  112.  
  113. PREVIEWING THE APPLET:
  114.  
  115. 13. If you wish to view an applet which you have generated most recently,
  116.     you should choose Project|Preview Applet.
  117.  
  118. ANIMATIONS:
  119.  
  120. 14. The Animation component found under the Animation tab allows you to
  121.     incorporate .GIF animations into your project.  After dropping
  122.     in an animation into the Screen, you should specify the first frame
  123.     of the Animation.  For example, the waving Duke animation from Sun
  124.     has frames Duke1, Duke2, Duke3, ...
  125.  
  126.     Click on the First Animation Frame property.  You should see a button
  127.     with an ellipses (three dots) appear.
  128.  
  129.     Click on the button and browse to the "images" sub-directory.
  130.  
  131.     Select Duke1.gif
  132.  
  133.     Click on Ok.
  134.  
  135.     Mojo will recognize how many frames of animations there are and
  136.     load them accordingly.  You will only see the first frame of the
  137.     animation until you run the applet.
  138.  
  139.     Properties of Interest:
  140.  
  141.     First Animation Frame   -- which animation to load.  select the first
  142.                                frame which must be ?????1.gif
  143.                                All frames should be numbered sequentially
  144.                                starting from 1.
  145.     Delay (in milliseconds) -- how long to wait between frames
  146.  
  147.  
  148. CODER:  (Switch to the Coder by choosing Window|Coder)
  149.  
  150. The Mojo Coder is the backend counter part to the Designer.  It is
  151. arranged like a Smalltalk class browser.
  152.  
  153. It consists of two hierarchies: a Class/Component hierarchy and a
  154. Project hierarchy.  The Project hierarchy shows the current Applet
  155. being built and how it is organized.  The Component hierarchy shows
  156. available classes and methods.
  157.  
  158. SWITCHING BETWEEN HIERARCHY VIEWS:
  159.  
  160. To see the Class Hierarchy, click on the tall skinny button found
  161. to the left of the Project Hierarchy with the ">" on it.  This will
  162. slide out the Class Hierarchy.  You should use this button to
  163. switch between both views.
  164.  
  165. DRAG AND DROP INSTANTIATION:
  166.  
  167. You can instantiate a class in the Coder by simply dragging a Component
  168. from the Class Hierarchy to the Project Hierachy.  The currently
  169. selected component in the Project hierarchy serves as the parent
  170. of the newly added componet.
  171.  
  172. OVERRIDING FUNCTIONS:
  173.  
  174. Mojo provides an easy means of overriding functions.  In the "Available 
  175. Function" list of the Project, click with the RIGHT mouse button.  Go 
  176. down to "Override Function" and you will see a list of all inherited 
  177. functions which you can then override.  For methods, you will have to 
  178. click on the Override Functions option to bring up the method browser 
  179. since the list is normally too large for a popup menu.
  180.  
  181. MOJO PARENT REFERENCE MODEL:
  182.  
  183. Referencing components in Mojo is significantly easier than using
  184. pure Java.  There are two primary keywords used for accessing
  185. parts of your applet:
  186.  
  187.         applet  <-- currently running applet
  188.         parent  <-- parent of the object
  189.  
  190. For instance to find out where the applet was started from, you could
  191. call:
  192.  
  193.         applet.getCodeBase();
  194.  
  195. For the given hierarchy below, you can reference another components
  196. methods and instances variables using the parent-reference model:
  197.  
  198. --+
  199.   |
  200.   +- Panel1
  201.         |
  202.         +- Button1
  203.         |
  204.         +- Button2
  205.  
  206. In the action event of Button2, you can call the action event of
  207. the Button1 with:
  208.  
  209.   Button2:
  210.         public boolean action(Event evt, Object what)
  211.         {
  212.            parent.Button1.action(evt, what);
  213.  
  214.            return(true);
  215.         }
  216.  
  217. Using parent, you are able to access all parts of the Project hierarchy.
  218.  
  219. INITIALIZATIONS:
  220.  
  221. Because of the nature of a visual environment, components which are
  222. drag-and-dropped in having implicit constructor calls.
  223.  
  224. To preform initialization which must be run before your component
  225. will function properly, add in the method:
  226.  
  227.         void initialize()
  228.  
  229. Common uses for the initialize method is to set initial values of
  230. instances variables.
  231.  
  232. OUTPUT DIRECTORY:
  233.  
  234. The default output directory is:
  235.  
  236.          MOJOBETA\myproject
  237.  
  238. In that directory are the following files:
  239.  
  240.         Client.HTM      <-- HTML File for bringing up applet
  241.         Client.java     <-- generated Java source
  242.         *.class         <-- generated class files
  243.  
  244. FINAL NOTE:
  245.  
  246. This README is not intended as a manual, please contact Penumbra Software,
  247. Inc. for more information on Mojo.
  248.  
  249. They can be reached at:
  250.  
  251.         techsupport@penumbrasoftware.com (for registered users)
  252.         
  253.                          or
  254.    
  255.              http://www.PenumbraSoftware.com
  256.  
  257.